const BMap = window.BMap;
/**
 * 利用百度地图来获取当前的城市信息
 */
export const getLocalCity = () => {
  return new Promise((resolve, reject) => {
    var myCity = new BMap.LocalCity();
    myCity.get(function (result) {
      resolve(result)
    });
  })
}

// getLocalCity().then(res=>console.log(res));
// const res=await getLocalCity();